package ru.ifmo.filemanager.core;

public class PluginInfo {
	private String pluginClass = "";

	private String fullFileName = "";
	
	public PluginInfo( String pluginClass, String path )
	{
		this.pluginClass = pluginClass;
		this.fullFileName = path;
	}
	
	public PluginInfo()
	{
		this( "", "");
	}

	public final String getPluginClass() {
		return pluginClass;
	}

	public final void setPluginClass(String pluginClass) {
		this.pluginClass = pluginClass;
	}

	public final String getFullFileName() {
		return fullFileName;
	}

	public final void setFullFileName(String fullFileName) {
		this.fullFileName = fullFileName;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result
				+ ((fullFileName == null) ? 0 : fullFileName.hashCode());
		result = prime * result
				+ ((pluginClass == null) ? 0 : pluginClass.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		PluginInfo other = (PluginInfo) obj;
		if (fullFileName == null) {
			if (other.fullFileName != null)
				return false;
		} else if (!fullFileName.equals(other.fullFileName))
			return false;
		if (pluginClass == null) {
			if (other.pluginClass != null)
				return false;
		} else if (!pluginClass.equals(other.pluginClass))
			return false;
		return true;
	}
}
